package in.co.codedoc.json;

import in.co.codedoc.tests.JUNitTestBase;

import org.junit.Test;


public class JSONMappingTests
	extends JUNitTestBase
{
	@Test
	public void testDecodeEncode()
	{
		JSONObjectValue json
			= (JSONObjectValue)JSONValue.Decode("{'nvps':{'key1' : ['foo1','bar0'],'key2':['bar0','foo2']}}");

		Foo3 foo3 = (Foo3)JSONUtil.Decode(json, "in.co.codedoc.json.Foo3");
		
		System.out.println(foo3);
		
		System.out.println(JSONUtil.Encode(foo3, "in.co.codedoc.json.Foo3").Encode());
		
	}

}
